<?php
class MembershipBase extends Zend_Db_Table
{
	protected $_name = "membershipbase";
	
	public function getUserGroups($id)
	{
		$select = $this->_db->select()
							->from(array('membershipBase'=>$this->_name),array('id','group_name'))
							->join(array('userBase'=>'userbase'),
										'userBase.name = membershipBase.user_name',null)
							->where('userBase.id = ?',$id);
		
		$results = $this->getAdapter()->fetchAll($select);
		return $results;
	}
}